Part Number Hot Search : 
1884416 N5392 AD7569TE 2SD796 RATED EP100 74AUP2G MB504
Product Description
Full Text Search
 

To Download AN4241 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  january 2013 doc id 024193 rev 1 1/18 AN4241 application note dspin? family: fully integrated stepper motor drivers by enrico poli introduction the l6470 and l6472 are fully integrated motor drivers providing a complete stand-alone solution for the high-end stepper motor applications. the devices can be controlled by a host microcontroller through a fast spi interface and are able to execute a complete set of motion commands. this document describes how the devices can be configured and gives some suggestions about the operation and the application design. the current control algorithm of the devices (the l6470 voltage mode driving and the l6472 advanced current control) is not investigated in this document. for further details, please, refer to the respective application notes an4144 "voltage mode control operation and parameter optimization" and an4158 "peak current control with automatic decay adjustment and predictive current control: basics and setup". www.st.com
contents AN4241 2/18 doc id 024193 rev 1 contents 1 the l6470 and l6472 communication interface . . . . . . . . . . . . . . . . . . . 3 1.1 communication protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 daisy chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 5 v and 3.3 v communication interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2 motion engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1 speed tracking commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2 positioning commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.2.1 change the target position of the on-the-fly command . . . . . . . . . . . . . . 9 2.3 stop commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.4 initializing position using gountil and releasesw commands . . . . . . . . 10 3 protections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.1 overtemperature protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2 overcurrent protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.3 undervoltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4 stall detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 5 main clock source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 6 layout suggestions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 7 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
AN4241 the l6470 and l6472 communication interface doc id 024193 rev 1 3/18 1 the l6470 and l6472 communication interface the device (always slave) can be driven by a mcu (always master) sending commands through an 8-bit spi interface. the 8-bit shift register of the device is kept enabled while cs input is forced low. during this time, at every raising edge of the serial clock (ck), the sdi input is stored into the shift register. at ck falling edges the sdo output is updated according to the last bit of the shift register. when the cs input is raised, the device catches the shift register content and interprets its value as a command or an argument of the previously received command. all the bytes are sent through the spi data lines starting from the most significant bit. 1.1 communication protocol the communication protocol is based on single byte commands that can be followed by a command argument up to 3 byte long which must be transmitted starting from the most significant byte. part of the information needed to execute the target operation could be embedded into the command byte, for example the target register address in the getparam and setparam commands, and the argument provides extra data as well as the target position of the goto command. by default the response byte of the device is h00 (hexadecimal format). some commands, for example those used to read the value of a register, generate a response from the device up to 3 byte long which is transmitted during the following transmission cycles starting from the most significant byte. 1.2 daisy chain the device is compatible with the daisy chain architecture allowing the mcu to drive multiple devices with a single spi interface. the daisy chain architecture is obtained as follows: master serial clock line is connected to the ck input of each slave device; master slave select line is connected to the cs input of each slave device; master serial data output (mosi) is connected to the sdi input of the first slave of the chain; the sdo output of each slave device is connected to the sdi input of the next one, last slave excluded; master serial data input (miso) is connected to the sdo output of the last slave of the chain, the connection diagram of the configuration is shown in figure 1 .
the l6470 and l6472 communication interface AN4241 4/18 doc id 024193 rev 1 figure 1. daisy chain connection diagram in this configuration, the chain of slaves acts as a single slave with an spi device of n byte. each communication cycle, for example when the master needs to transmit/receive a byte from/to a slave, the master must fill all the shift registers of the slaves before raising the cs line. the devices are addressed according to the position of the byte in the communication cycle: the first byte transmitted by the master is received by the last device of the chain; the second one is received by the last-but-one slave and so on down to the last transmitted byte which is received by the first slave of the chain. the response bytes from the device chain are addressed to the same way: the first byte received by the master has been transmitted by the last device of the chain; the second one has been transmitted by the last-but-one slave and so on down to the last received byte which has been transmitted by the first slave of the chain. in theory, the number of slaves that an mcu can drive using the daisy chain configuration is unlimited; in practice the maximum number of devices connected to the same spi depends on the clock skew. the number of slaves limits the communication speed also because every time a byte has to be transmitted to a device, the whole n slave chain has to be filled transmitting n - 1 extra bytes. 1.3 5 v and 3.3 v communication interface the device can be configured to operate both with 3.3 v and 5 v standard logic as shown in figure 2 . mcu s eri a l clock s l a ve s elect s eri a l d a t a o u t s eri a l d a t a in device 1 (1 s t of the ch a in) to s di of device 2 to s di of device x+2 from s do of device x -1 from s do of device n -1 device x device x+1 device n (l as t of the ch a in) c s ck s di s do c s ck s di s do c s ck s di s do c s ck s di s do am165 8 7v1
AN4241 the l6470 and l6472 communication interface doc id 024193 rev 1 5/18 figure 2. logic interface supply scenarios c ddpol c dd c regpol c reg 10 f 100 nf 100 nf 47 f vreg vdd c ddpol c dd c reg 10 f 100 nf 100 nf vreg vdd c ddpol c dd c regpol c reg 10 f 100 nf 100 nf 47 f vreg vdd 3 . 3 v 3 . 3 v 5 v c ddpol c dd c reg 10 f 100 nf 100 nf vreg vdd 5 v f u lly s elf su pplied device compli a nt with 3 . 3 v logic s elf su pplied device compli a nt with 5 v logic extern a lly su pplied device compli a nt with 3 . 3 v logic extern a lly su pplied device compli a nt with 5 v logic am165 88 v1
motion engine AN4241 6/18 doc id 024193 rev 1 2 motion engine the dspin? family devices integrate a motion engine providing a full set of commands. the motion engine generates the step sequence according to the programmed speed profile and the requested command. the speed profile represents the operation boundaries, defined by the acceleration, deceleration, maximum and minimum speed, which should be respected to ensure the proper functioning of the application. the devices allow all the parameters to be set independently: acceleration and deceleration values range from 14.55 up to 59590 steps/s2. the device can also be set to use an infinite acceleration and deceleration value; in this case, both the acceleration and deceleration phases are totally skipped. maximum speed value ranges from 15.25 steps/s up to 15610 step/s. minimum speed value ranges from 0 up to 976 steps/s. the acceleration, deceleration and minimum speed parameters can be modified when the motor is stopped only. the maximum speed can be also changed when the motor is running, but the new value is only considered at next command execution. the commands supported by the motion engine are listed in ta b l e 1 . table 1. command list name length (bytes) description notes move 4 (including 3 of arguments) performing the target number of microsteps as per requested direction. can be executed when the motor is stopped only. goto 4 (including 3 of arguments) reaching the absolute target position (abs_pos register) using the shortest path. not accepted while another command is under execution. goto_dir 4 (including 3 of arguments) reaching the absolute target position (abs_pos register) running as per requested direction. not accepted while another command is under execution. gohome 1 reaching the home position (all zeroes) using the shortest path. not accepted while another command is under execution. gomark 1 reaching the position stored into the mark register using the shortest path. not accepted while another command is under execution. run 4 (including 3 of arguments) reaching the target speed in the requested direction. always accepted and immediately executed (if present, the previous command is aborted) stepclock 1 switching the device in step-clock mode imposing the direction. can be executed when the motor is stopped only.
AN4241 motion engine doc id 024193 rev 1 7/18 2.1 speed tracking commands during the speed tracking, the device dynamically changes the motor speed according to the application requirements. the run command can be used to achieve this result. the run command sets the speed target and direction which the motor has to reach. both speed target and direction can be changed in real time through a new run command (see figure 3 ). gountil 4 (including 3 of arguments) reaching the speed target in the requested direction and stopping when sw input is forced low (falling edge). always accepted and immediately executed (if present, the previous command is aborted) releasesw 1 runnig the motor at low speed in the requested direction and stopping when sw input is forced high (rising edge). always accepted and immediately executed (if present, the previous command is aborted) softstop 1 stopping the motor in accordance to the programmed speed profile. always accepted and immediately executed (if present, the previous command is aborted) hardstop 1 stopping the motor immediately (infinite deceleration). always accepted and immediately executed (if present, the previous command is aborted) softhiz 1 stopping the motor in accordance to the programmed speed profile and then disabling the power bridges. always accepted and immediately executed (if present, the previous command is aborted) hardhiz 1 disabling the power bridges immediately. always accepted and immediately executed (if present, the previous command is aborted) table 1. command list (continued) name length (bytes) description notes
motion engine AN4241 8/18 doc id 024193 rev 1 figure 3. speed tracking using run command sequences 2.2 positioning commands the motion engine, integrated into the devices, allows the position of the motor in a target position based on integrated abs_pos register. the abs_pos register traces all the motion performed by the motor adding a unit to each microstep completed in forward direction and subtracting a unit when the microstep is performed in reverse direction. the target positioning can be directly imposed indicating the abs_pos register value (absolute position) or the distance between the current position and the target one (relative position). the relative positioning command is move. the motion engine executes this command only when the motor is stopped in order to avoid unexpected behaviors (e.g. the target of number of steps is not enough to allow the speed profile compliance). figure 4. relative positioning command example s peed 100 100 200 200 3 00 3 00 400 400 500 time r u n(forw a rd, 100) r u n(forw a rd, 600) r u n(forw a rd, 400) r u n(rever s e, 3 00) am165 8 9v1 0 h200000 h 3 fffff h1fffff h000001 0 h200000 h 3 fffff h1fffff h000001 s t a rting po s ition s t a rting po s ition fin a l po s ition move(rever s e) move(forw a rd) fin a l po s ition am16590v1
AN4241 motion engine doc id 024193 rev 1 9/18 the absolute positioning commands are goto and goto_dir. the former moves the motor to the position target choosing the rotation direction according to a minimum path algorithm (i.e. the lower number of microsteps is executed) whereas the latter imposes the direction directly. figure 5. absolute positioning command example if a goto command is requested when the motor is running, the minimum path algorithm also considers the steps required to reverse the direction (see figure 6 ). figure 6. minimum path algorithm when motor is running the goto and goto_dir can only be executed when no other commands are under execution. 2.2.1 change the target position of the on-the-fly command if a run command is sent to the device during the execution of a goto command, it aborts the previous command. this effect can be used to change the target position of the motion engine on-the-fly. 0 h200000 h 3 fffff h1fffff h000001 0 h200000 h 3 fffff h1fffff h000001 s t a rting po s ition s t a rting po s ition t a rget po s ition t a rget po s ition goto goto_dir(forw a rd) am16591v1 0 h200000 > then forw a rd direction i s us ed. h 3 fffff h1fffff h000001 c u rrent po s ition zero s peed po s ition (where the motor will s top if it s t a rt s deceler a ting) t a rget po s ition motor i s r u nning in forw a rd direction forw a rd direction p a th forw a rd direction p a th rever s e direction p a th rever s e direction p a th am16592v1
motion engine AN4241 10/18 doc id 024193 rev 1 following the suggested sequence of operations: 1. read the current motor speed (speed register) and direction (dir bit in the status register). 2. send a run command setting the target speed and direction equal to the values obtained at point 1. 3. wait for the execution command monitoring the busy pin or the busy flag in the status register. 4. send the new positioning command. this operation could introduce a small error in the generation of the speed profile. if the target position is changed a high number of times (tracking position) the error increases and anomalous behaviors could occur. 2.3 stop commands the motor can be stopped through the stop commands. these commands can be sent at any time and they are executed immediately. the softstop command stops the motor fitting the deceleration value of the speed profile whereas hardstop command stops the motor immediately (infinite deceleration). the softhiz and hardhiz commands operate similarly, but the power bridges are disabled as soon as the zero speed is reached (the high impedance status is forced). 2.4 initializing position using gountil and releasesw commands the gountil and releasesw commands can be used to initialize the absolute position information stored into the abs_pos register according to an external position sensor. in this way a relation between abs_pos value and mechanical position of the motor can be established. the position initialization sequence, as shown in figure 7 , is the following: 1. in power-up status, the load position is unknown. 2. using gountil command the load is moved to the limit switch at high speed. 3. when the load reaches the limit switch the sw input of the device is forced low. the motor decelerates and then stops. 4. considering the high speed used to approach the load to the limit switch, a significant error in the positioning could happen. 5. using releasesw command the load is moved away from the limit switch at low speed. 6. as soon as the threshold position of the limit switch is crossed by the load the sw input of the device is forced high. the motor stops immediately. 7. the load is positioned in correspondence to the threshold position of the limit switch with a high precision.
AN4241 motion engine doc id 024193 rev 1 11/18 figure 7. initialization position using gountil and releasesw commands lo a d in u nknown po s ition po s ition s en s or (limit s witch) s tepper motor d s pin f a mily motor driver gountil comm a nd i s exec u ted a nd the lo a d re a che s the limit s witch s w s w rele as e s w comm a nd i s exec u ted a nd the lo a d i s po s itioned ex a ctly on the triggering point of the limit s witch s w am1659 3 v1
protections AN4241 12/18 doc id 024193 rev 1 3 protections the dspin? family devices provide a complete set of protections designed to prevent from damaging the device in critical conditions. the implemented protections are: overtemperature (see section 3.1 ) overcurrent (see section 3.2 ) undervoltage (see section 3.3 ) 3.1 overtemperature protection the overtemperature protection disables the power stage of the device when the temperature of the chip exceeds the safe operation conditions. when the overtemperature protection is triggered the device is locked in a safe condition (all mosfets are turned off) and is kept in this condition until the junction temperature decreases below 130 c (typical). the thermal shutdown event occurrence is signaled through the respective flag (th_sd) in the status register which is kept low until it is released by a getstatus command (more details are available in the datasheet of the device). a warning threshold is also present allowing the host to control the device to prevent the shutdown. 3.2 overcurrent protection the overcurrent protection monitors the current in all power mosfets of the device and disables the power stage when the programmed current threshold is reached. no information about the specific mosfet or bridge causing the failure is available. as soon as the overcurrent protection is triggered, the device is locked in a safe condition (all mosfets are turned off) and is kept in this condition until the ocd failure flag is released by a getstatus command. when the device is locked in safe state no command enabling the bridges can be executed (e.g. move, run, goto, hardstop, etc.). the commands are simply ignored, no non- performable signalling is returned by the device. warning: the overcurrent protection can be disabled setting the oc_sd pin of the config register to zero. however it is not recommended this protection to be disabled. 3.3 undervoltage the undervoltage protection avoids the power stage of the device to operate with a supply voltage below the safe conditions.
AN4241 protections doc id 024193 rev 1 13/18 at power-up, the device is in undervoltage status: the power bridges of the device are kept disabled until the supply voltage is below the turn-on threshold. in this condition all the commands enabling the bridges (e.g. move, run, goto, hardstop, etc.) are ignored and the uvlo failure flag is forced low. when the turn-on threshold is reached the power bridges are operative. the uvlo flag is kept low until it is released through a getstatus command. the device returns in undervoltage status if the supply voltage falls below the turn-off threshold. figure 8. undervoltage protection t u rn-on thre s hold v s time power b ridge s a re kept di sab led. to zero. power b ridge s a re kept di sab led. power b ridge s c a n b e en ab led. it i s rele as ed (get s t a t us comm a nd). power b ridge s c a n b e en ab led. it i s rele as ed (get s t a t us comm a nd). t u rn-off thre s hold the uvlo fl a g i s forced to zero. the uvlo fl a g i s forced the uvlo fl a g i s kept to zero u ntil the uvlo fl a g i s kept to zero u ntil am16594v1
stall detection AN4241 14/18 doc id 024193 rev 1 4 stall detection the l6470 also includes a sensorless stall detection system. this feature allows the device to detect the stall condition of the motor measuring the increase of phase current caused by the sudden cancellation of the back electromotive force. the voltage mode control applies a sinusoidal voltage to the motor phases obtaining a sinusoidal current. the amplitude of the voltage sinewave increases according to the speed in order to compensate the back electromotive force effect and keep the amplitude of the phase current constant. if the motor stalls (i.e. stops its rotation) the back electromotive force becomes null, but the voltage applied to the phase is still increased to face its effect. in this condition the phase current results higher than the nominal one and the stall condition can be easily detected. the stall detection threshold must be set above the nominal peak current. figure 9. stall detection threshold s t a ll thre s hold s t a ll thre s hold norm a l condition ss t a ll condition s i ph i ph am16595v1
AN4241 main clock source doc id 024193 rev 1 15/18 5 main clock source the motion engine integrated into the dspin? generates the internal step clock starting from the main clock source of the system. as a consequence, the perturbations on the main clock affect the accuracy with which the device generates the speed of the motor (step rate). in the l6470 the main clock also affects the frequency of the pwm modulators and in the l6472 it is used for the measurement of the timings of the advanced current control. the devices can operate with both external and internal clock sources. by default the clock source is the integrated oscillator operating at 16 mhz. this solution, if compared to a high precision external source, allows the maximum integration with a lower precision of the generation of the speed profile (acceleration, deceleration and target speed). the effects on the current control systems (voltage mode or advanced current control) are negligible. the device can be configured to use an external clock source or to drive a crystal/resonator. in both cases the clock frequency must be chosen among four values: 8, 16, 24 or 32 mhz. warning: setting the wrong value or applying a clock frequency significantly different from the nominal value might cause failures. the external clock source allows a higher precision of the speed profile to be obtained.
layout suggestions AN4241 16/18 doc id 024193 rev 1 6 layout suggestions the devices of the dspin? family integrate a power stage which can dissipate a significant amount of power compared to the die dimension. for this reason, the devices are proposed in packages with high thermal performance and exposed pads in order to ease the heat dissipation. in this situation, the layout of the board is a significant part of the thermal design of the application. the exposed pad of the device must be directly connected to the ground layer of the board, which acts as a heat sink. for the same reason, the size of the ground layer must be as wider as possible and, if more layers are present, the top and bottom ones should be preferred. in multi-layer designs the exposed pad must be connected to all the ground layers using multiple vias equally spaced.
AN4241 revision history doc id 024193 rev 1 17/18 7 revision history table 2. document revision history date revision changes 25-jan-2013 1 initial release.
AN4241 18/18 doc id 024193 rev 1 please read carefully: information in this document is provided solely in connection with st products. stmicroelectronics nv and its subsidiaries (?st ?) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described he rein at any time, without notice. all st products are sold pursuant to st?s terms and conditions of sale. purchasers are solely responsible for the choice, selection and use of the st products and services described herein, and st as sumes no liability whatsoever relating to the choice, selection or use of the st products and services described herein. no license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. i f any part of this document refers to any third party products or services it shall not be deemed a license grant by st for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoev er of such third party products or services or any intellectual property contained therein. unless otherwise set forth in st?s terms and conditions of sale st disclaims any express or implied warranty with respect to the use and/or sale of st products including without limitation implied warranties of merchantability, fitness for a particular purpose (and their equivalents under the laws of any jurisdiction), or infringement of any patent, copyright or other intellectual property right. unless expressly approved in writing by two authorized st representatives, st products are not recommended, authorized or warranted for use in military, air craft, space, life saving, or life sustaining applications, nor in products or systems where failure or malfunction may result in personal injury, death, or severe property or environmental damage. st products which are not specified as "automotive grade" may only be used in automotive applications at user?s own risk. resale of st products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by st for the st product or service described herein and shall not create or extend in any manner whatsoev er, any liability of st. st and the st logo are trademarks or register ed trademarks of st in various countries. information in this document supersedes and replaces all information previously supplied. the st logo is a registered trademark of stmicroelectronics. all other names are the property of their respective owners. ? 2013 stmicroelectronics - all rights reserved stmicroelectronics group of companies australia - belgium - brazil - canada - china - czech republic - finland - france - germany - hong kong - india - israel - ital y - japan - malaysia - malta - morocco - philippines - singapore - spain - sweden - switzerland - united kingdom - united states of america www.st.com


▲Up To Search▲   

 
Price & Availability of AN4241

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X